<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户列表页面</title>
    <link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
    <script src="../static/js/bootstrap.min.js" th:src="@{/js/bootstrap.min.js}"></script>
    <script src="../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>


    <style>
        /*设置表格th标题居中显示*/
        .table th, .table td {
        text-align: center;
        vertical-align: middle!important;
        }
    </style>

</head>
<body>

<fieldset style="width:250px; margin:0px auto">
    <p>
    <h2>学生信息列表</h2>
    </p>
</fieldset>
<div class="table-responsive">
    <table class="table table-bordered" style="width: 70%;margin:0px auto">
        <thead>
        <tr class="success">
            <th><input type="checkbox" id="checkAll"/></th>
            <th style="font-weight: bold">编号</th>
            <th>姓名</th>
            <th>性别</th>
            <th>年龄</th>
            <th>地址</th>
            <th>QQ</th>
            <th>邮箱</th>
            <th>操作</th>
        </tr>
        </thead>

        <tbody id="mytbd">
        <tr th:each="user : ${users}">
            <th><input type="checkbox" id="checkAll"/></th>
            <td th:text="${user.id}"></td>
            <td th:text="${user.name}"></td>
            <td th:text="${user.gender}"></td>
            <td th:text="${user.age}"></td>
            <td th:text="${user.address}"></td>
            <td th:text="${user.qq}"></td>
            <td th:text="${user.email}"></td>
            <td>
                <a class="btn btn-info" th:href="@{/del(id=${user.id})}">删除</a>
                <a class="btn btn-info" th:href="@{/update(id=${user.id})}">修改</a>
                <a class="btn btn-info" th:href="@{/add}">添加</a>
            </td>
            <!--<td>-->
                <!--<ul class="dropdown-menu" role="menu">-->
                    <!--<li><a href="#">修改</a></li>-->
                    <!--<li><a href="#">删除</a></li>-->
                <!--</ul>-->
            <!--</td>-->
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>